//
//  ViewController.swift
//  SwiftUIPractice
//
//  Created by Chicken's Friend (external - Project) on 2024/8/6.
//

import UIKit
import SwiftUI

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .brown
        
        setInternalUI()
        
    }

    func setInternalUI() {
        let hostingController = UIHostingController(rootView: SwiftUIView_Conditional())
        addChild(hostingController)
        view.addSubview(hostingController.view)
        hostingController.didMove(toParent: self)
        hostingController.view.frame = view.bounds
        hostingController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
    }
}

